import '@/styles/index.scss'
import { VueQueryPlugin } from '@tanstack/vue-query'
import 'uno.css'
import { createSSRApp } from 'vue'

import App from './App.vue'
import { prototypeInterceptor, requestInterceptor, routeInterceptor } from './interceptors'
import store from './stores'
import AsyncLoading from './components/AsyncLoading/index.vue'
import DForms from "./components/DForms/index.vue";
import DFormsItem from "./components/DFormsItem/index.vue";

export function createApp() {
  const app = createSSRApp(App)
  app.use(store)
  app.use(routeInterceptor)
  app.use(requestInterceptor)
  app.use(prototypeInterceptor)
  app.use(VueQueryPlugin)
  app.component('AsyncLoading', AsyncLoading)
  app.component('DForms', DForms)
  app.component('DFormsItem', DFormsItem)

  return {
    app,
  }
}
